home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995…tember: Reference Library / Dev.CD Sep 95 RL / Dev.CD Sep 95 RL.toast / mac / Technical Documentation / develop / develop Issue 8 code / AUX Hybrid Apps / AUX System Calls / src / shmsys.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-10-09  |  715 b   |  43 lines  |  [TEXT/tefi]

  1. /*    @(#)shmsys.c    2.1     */
  2. #include <LibAUX.h>
  3.  
  4. #include    </:usr:include:sys:types.h>
  5. #include    </:usr:include:sys:ipc.h>
  6. #include    </:usr:include:sys:shm.h>
  7.  
  8. #define    SHMSYS    52
  9.  
  10. #define    SHMAT    0
  11. #define    SHMCTL    1
  12. #define    SHMDT    2
  13. #define    SHMGET    3
  14.  
  15. char *
  16. auxshmat(shmid, shmaddr, shmflg)
  17. int shmid;
  18. char *shmaddr;
  19. int shmflg;
  20. {
  21.     return((char *)auxsyscall(SHMSYS, SHMAT, shmid, shmaddr, shmflg));
  22. }
  23.  
  24. auxshmctl(shmid, cmd, buf)
  25. int shmid, cmd;
  26. struct shmid_ds *buf;
  27. {
  28.     return(auxsyscall(SHMSYS, SHMCTL, shmid, cmd, buf));
  29. }
  30.  
  31. auxshmdt(shmaddr)
  32. char *shmaddr;
  33. {
  34.     return(auxsyscall(SHMSYS, SHMDT, shmaddr));
  35. }
  36.  
  37. auxshmget(key, size, shmflg)
  38. key_t key;
  39. int size, shmflg;
  40. {
  41.     return(auxsyscall(SHMSYS, SHMGET, key, size, shmflg));
  42. }
  43.